Skip to content

Fix Next.js 15+ params handling and environment-driven metadata URLs#30

Merged
naheel0 merged 2 commits intoSEOfrom
copilot/sub-pr-29
Feb 15, 2026
Merged

Fix Next.js 15+ params handling and environment-driven metadata URLs#30
naheel0 merged 2 commits intoSEOfrom
copilot/sub-pr-29

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 15, 2026

Addresses Next.js 15+ compatibility issues where route params are Promises, fixes aria-label forwarding in SearchInput, and removes hardcoded URLs from metadata to support custom domains via environment variables.

Changes

  • PageProps interface (src/app/generate/[repo]/page.tsx)

    • Type params as Promise<{ repo: string }> for Next.js 15+ compatibility
  • SearchInput accessibility (src/components/Generator/SearchInput.tsx)

    • Add ariaLabel?: string prop and forward to input element
  • Metadata URLs (src/app/layout.tsx, src/app/generate/[repo]/page.tsx)

    • Change openGraph.url to relative paths ("/", /generate/${repoName}) to resolve against metadataBase
    • Use process.env.NEXT_PUBLIC_SITE_URL for JSON-LD structured data URL
// Before
interface PageProps {
  params: { repo: string };
}

// After
interface PageProps {
  params: Promise<{ repo: string }>;
}
// Before
openGraph: {
  url: "https://readmegen-ai.vercel.app",
  // ...
}

// After
openGraph: {
  url: "/",  // Resolves against metadataBase
  // ...
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI mentioned this pull request Feb 15, 2026
10 tasks
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Feb 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
readme-gen-ai Ready Ready Preview, Comment Feb 15, 2026 0:03am

Co-authored-by: naheel0 <191262736+naheel0@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 15, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/ReadmeGenAI/ReadmeGenAI/node_modules/.bin/next build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add SEO enhancements to improve visibility Fix Next.js 15+ params handling and environment-driven metadata URLs Feb 15, 2026
Copilot AI requested a review from naheel0 February 15, 2026 12:04
@naheel0 naheel0 marked this pull request as ready for review February 15, 2026 12:05
@naheel0 naheel0 requested a review from adithyanmkd as a code owner February 15, 2026 12:05
@naheel0 naheel0 merged commit 3b50fb7 into SEO Feb 15, 2026
3 checks passed
@naheel0 naheel0 deleted the copilot/sub-pr-29 branch February 15, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants